#include"Server.hpp"

int main()
{
    Server server;
    std::cout << "pos 1" << std::endl;
    server.OpenForRead();
    std::cout << "pos 2" << std::endl;

    
    while(true)
    {
        std::string message;
        if(server.ReadPipe(&message) > 0)
        {
            std::cout <<"Client say#" << message << std::endl;
        }
        else
        {
            //写端关闭，读到0，
            break; 
        }
    }

    std::cout <<"Client quit,me too" << std::endl;

    return 0;
}